package uwosh.cs342.project1;

public class Contact {

	private String contactFirstName, contactMiddleName, contactLastName,
			contactCellPhone, contactHomePhone, contactAltPhone,
			contactAddress, contactBirthday, contactEmail, contactComments;
	private long id;

	/*
	 * Default constructor for the Contact class. Upon creation, a first name
	 * has to be set so that a contact can be identified. Otherwise, it would
	 * appear as null or a blank spot on the list. The other attributes of a
	 * contact are optional and can be set after object creation, if at all.
	 */
	public Contact(String contactFirstName) {
		this.contactFirstName = contactFirstName;
		this.contactMiddleName = "";
		this.contactLastName = "";
		this.contactCellPhone = "";
		this.contactHomePhone = "";
		this.contactAltPhone = "";
		this.contactAddress = "";
		this.contactBirthday = "";
		this.contactEmail = "";
		this.contactComments = "";
	}// end constructor
	
	public Contact(String contactFirstName, String Mid, String Last, String Cell, String Home,
			String Alt, String Ad, String bday, String em, String comments) {
		this.contactFirstName = contactFirstName;
		this.contactMiddleName = Mid;
		this.contactLastName = Last;
		this.contactCellPhone = Cell;
		this.contactHomePhone = Home;
		this.contactAltPhone = Alt;
		this.contactAddress = Ad;
		this.contactBirthday = bday;
		this.contactEmail = em;
		this.contactComments = comments;
	}// end constructor

	public Contact() {
		this.contactFirstName = "";
		this.contactMiddleName = "";
		this.contactLastName = "";
		this.contactCellPhone = "";
		this.contactHomePhone = "";
		this.contactAltPhone = "";
		this.contactAddress = "";
		this.contactBirthday = "";
		this.contactEmail = "";
		this.contactComments = "";
	}// end constructor

	public String getContactFirstName() {
		return contactFirstName;
	}// end getContactFirstName

	public void setContactFirstName(String contactFirstName) {
		this.contactFirstName = contactFirstName;
	}// end setContactFirstName

	public String getContactMiddleName() {
		return contactMiddleName;
	}// end getContactMiddleName

	public void setContactMiddleName(String contactMiddleName) {
		this.contactMiddleName = contactMiddleName;
	}// end setContactMiddleName

	public String getContactLastName() {
		return contactLastName;
	}// end getContactLastName

	public void setContactLastName(String contactLastName) {
		this.contactLastName = contactLastName;
	}// end setContactLastName

	public String getContactAddress() {
		return contactAddress;
	}// end getContactAddress

	public void setContactAddress(String contactAddress) {
		this.contactAddress = contactAddress;
	}// end setContactAddress

	public String getContactBirthday() {
		return contactBirthday;
	}// end getContactBirthday

	public void setContactBirthday(String contactBirthday) {
		this.contactBirthday = contactBirthday;
	}// end setContactBirthday

	public String getContactEmail() {
		return contactEmail;
	}// end getContactEmail

	public void setContactEmail(String contactEmail) {
		this.contactEmail = contactEmail;
	}// end setContactEmail

	public String getContactCellPhone() {
		return contactCellPhone;
	}

	public void setContactCellPhone(String contactCellPhone) {
		this.contactCellPhone = contactCellPhone;
	}

	public String getContactHomePhone() {
		return contactHomePhone;
	}

	public void setContactHomePhone(String contactHomePhone) {
		this.contactHomePhone = contactHomePhone;
	}

	public String getContactAltPhone() {
		return contactAltPhone;
	}

	public void setContactAltPhone(String contactAltPhone) {
		this.contactAltPhone = contactAltPhone;
	}

	public String getContactComments() {
		return contactComments;
	}

	public void setContactComments(String contactComments) {
		this.contactComments = contactComments;
	}

	public long getID() {
		return id;
	}

	public void setID(long id) {
		this.id = id;
	}

	/*
	 * The toString method is used to display the first and last name (if
	 * available) of the contact in the contact list.
	 */
	@Override
	public String toString() {
		String output = contactFirstName;
		if (!contactLastName.isEmpty())
			output += " " + contactLastName;
		return output;
	}// end toString

}// end class
